{
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "# Anomaly Detection SVM"
      ],
      "metadata": {
        "nteract": {
          "transient": {
            "deleting": false
          }
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "#### Anomaly Detection for Support Vector Machine (SVM) is an unsupervised model for anomaly or outlier detection. For example, a One-class classification method is used to detect the outliers and anomalies in a dataset."
      ],
      "metadata": {
        "nteract": {
          "transient": {
            "deleting": false
          }
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "import numpy as np\n",
        "import matplotlib.pyplot as plt\n",
        "import seaborn as sns\n",
        "import pandas as pd\n",
        "\n",
        "import warnings\n",
        "warnings.filterwarnings(\"ignore\")\n",
        "\n",
        "# yahoo finance is used to fetch data \n",
        "import yfinance as yf\n",
        "yf.pdr_override()"
      ],
      "outputs": [],
      "execution_count": 1,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2022-06-29T01:14:24.051Z",
          "iopub.execute_input": "2022-06-29T01:14:24.056Z",
          "iopub.status.idle": "2022-06-29T01:14:24.601Z",
          "shell.execute_reply": "2022-06-29T01:14:24.594Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# input\n",
        "symbol = 'AMD'\n",
        "start = '2007-01-01'\n",
        "end = '2018-12-28'\n",
        "\n",
        "# Read data \n",
        "dataset = yf.download(symbol,start,end)\n",
        "\n",
        "# View Columns\n",
        "dataset.head()"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "[*********************100%***********************]  1 of 1 completed\n"
          ]
        },
        {
          "output_type": "execute_result",
          "execution_count": 2,
          "data": {
            "text/plain": "                 Open       High        Low      Close  Adj Close    Volume\nDate                                                                       \n2007-01-03  20.080000  20.400000  19.350000  19.520000  19.520000  28350300\n2007-01-04  19.660000  19.860001  19.320000  19.790001  19.790001  23652500\n2007-01-05  19.540001  19.910000  19.540001  19.709999  19.709999  15902400\n2007-01-08  19.709999  19.860001  19.370001  19.469999  19.469999  15814800\n2007-01-09  19.450001  19.709999  19.370001  19.650000  19.650000  14494200",
            "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Open</th>\n      <th>High</th>\n      <th>Low</th>\n      <th>Close</th>\n      <th>Adj Close</th>\n      <th>Volume</th>\n    </tr>\n    <tr>\n      <th>Date</th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>2007-01-03</th>\n      <td>20.080000</td>\n      <td>20.400000</td>\n      <td>19.350000</td>\n      <td>19.520000</td>\n      <td>19.520000</td>\n      <td>28350300</td>\n    </tr>\n    <tr>\n      <th>2007-01-04</th>\n      <td>19.660000</td>\n      <td>19.860001</td>\n      <td>19.320000</td>\n      <td>19.790001</td>\n      <td>19.790001</td>\n      <td>23652500</td>\n    </tr>\n    <tr>\n      <th>2007-01-05</th>\n      <td>19.540001</td>\n      <td>19.910000</td>\n      <td>19.540001</td>\n      <td>19.709999</td>\n      <td>19.709999</td>\n      <td>15902400</td>\n    </tr>\n    <tr>\n      <th>2007-01-08</th>\n      <td>19.709999</td>\n      <td>19.860001</td>\n      <td>19.370001</td>\n      <td>19.469999</td>\n      <td>19.469999</td>\n      <td>15814800</td>\n    </tr>\n    <tr>\n      <th>2007-01-09</th>\n      <td>19.450001</td>\n      <td>19.709999</td>\n      <td>19.370001</td>\n      <td>19.650000</td>\n      <td>19.650000</td>\n      <td>14494200</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
          },
          "metadata": {}
        }
      ],
      "execution_count": 2,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2022-06-29T01:14:24.608Z",
          "iopub.execute_input": "2022-06-29T01:14:24.612Z",
          "iopub.status.idle": "2022-06-29T01:14:25.434Z",
          "shell.execute_reply": "2022-06-29T01:14:25.453Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Create more data\n",
        "dataset['Increase_Decrease'] = np.where(dataset['Volume'].shift(-1) > dataset['Volume'],1,0)\n",
        "dataset['Buy_Sell_on_Open'] = np.where(dataset['Open'].shift(-1) > dataset['Open'],1,0)\n",
        "dataset['Buy_Sell'] = np.where(dataset['Adj Close'].shift(-1) > dataset['Adj Close'],1,0)\n",
        "dataset['Return'] = dataset['Adj Close'].pct_change()\n",
        "dataset = dataset.dropna()\n",
        "dataset.head()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 3,
          "data": {
            "text/plain": "                 Open       High        Low      Close  Adj Close    Volume  \\\nDate                                                                          \n2007-01-04  19.660000  19.860001  19.320000  19.790001  19.790001  23652500   \n2007-01-05  19.540001  19.910000  19.540001  19.709999  19.709999  15902400   \n2007-01-08  19.709999  19.860001  19.370001  19.469999  19.469999  15814800   \n2007-01-09  19.450001  19.709999  19.370001  19.650000  19.650000  14494200   \n2007-01-10  19.639999  20.020000  19.500000  20.010000  20.010000  19783200   \n\n            Increase_Decrease  Buy_Sell_on_Open  Buy_Sell    Return  \nDate                                                                 \n2007-01-04                  0                 0         0  0.013832  \n2007-01-05                  0                 1         0 -0.004043  \n2007-01-08                  0                 0         1 -0.012177  \n2007-01-09                  1                 1         1  0.009245  \n2007-01-10                  1                 1         1  0.018321  ",
            "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Open</th>\n      <th>High</th>\n      <th>Low</th>\n      <th>Close</th>\n      <th>Adj Close</th>\n      <th>Volume</th>\n      <th>Increase_Decrease</th>\n      <th>Buy_Sell_on_Open</th>\n      <th>Buy_Sell</th>\n      <th>Return</th>\n    </tr>\n    <tr>\n      <th>Date</th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>2007-01-04</th>\n      <td>19.660000</td>\n      <td>19.860001</td>\n      <td>19.320000</td>\n      <td>19.790001</td>\n      <td>19.790001</td>\n      <td>23652500</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0.013832</td>\n    </tr>\n    <tr>\n      <th>2007-01-05</th>\n      <td>19.540001</td>\n      <td>19.910000</td>\n      <td>19.540001</td>\n      <td>19.709999</td>\n      <td>19.709999</td>\n      <td>15902400</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>-0.004043</td>\n    </tr>\n    <tr>\n      <th>2007-01-08</th>\n      <td>19.709999</td>\n      <td>19.860001</td>\n      <td>19.370001</td>\n      <td>19.469999</td>\n      <td>19.469999</td>\n      <td>15814800</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n      <td>-0.012177</td>\n    </tr>\n    <tr>\n      <th>2007-01-09</th>\n      <td>19.450001</td>\n      <td>19.709999</td>\n      <td>19.370001</td>\n      <td>19.650000</td>\n      <td>19.650000</td>\n      <td>14494200</td>\n      <td>1</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.009245</td>\n    </tr>\n    <tr>\n      <th>2007-01-10</th>\n      <td>19.639999</td>\n      <td>20.020000</td>\n      <td>19.500000</td>\n      <td>20.010000</td>\n      <td>20.010000</td>\n      <td>19783200</td>\n      <td>1</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.018321</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
          },
          "metadata": {}
        }
      ],
      "execution_count": 3,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2022-06-29T01:14:25.440Z",
          "iopub.execute_input": "2022-06-29T01:14:25.444Z",
          "shell.execute_reply": "2022-06-29T01:14:25.456Z",
          "iopub.status.idle": "2022-06-29T01:14:25.472Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "dataset.shape"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 4,
          "data": {
            "text/plain": "(3017, 10)"
          },
          "metadata": {}
        }
      ],
      "execution_count": 4,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "shell.execute_reply": "2022-06-29T01:14:25.533Z",
          "iopub.status.busy": "2022-06-29T01:14:25.478Z",
          "iopub.execute_input": "2022-06-29T01:14:25.482Z",
          "iopub.status.idle": "2022-06-29T01:14:25.490Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "dataset.describe()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 5,
          "data": {
            "text/plain": "              Open         High          Low        Close    Adj Close  \\\ncount  3017.000000  3017.000000  3017.000000  3017.000000  3017.000000   \nmean      7.306695     7.460504     7.137385     7.296622     7.296622   \nstd       5.033517     5.147391     4.903212     5.027697     5.027697   \nmin       1.620000     1.690000     1.610000     1.620000     1.620000   \n25%       3.620000     3.690000     3.540000     3.610000     3.610000   \n50%       6.110000     6.250000     5.970000     6.120000     6.120000   \n75%       9.750000     9.900000     9.530000     9.710000     9.710000   \nmax      33.180000    34.139999    32.189999    32.720001    32.720001   \n\n             Volume  Increase_Decrease  Buy_Sell_on_Open     Buy_Sell  \\\ncount  3.017000e+03        3017.000000       3017.000000  3017.000000   \nmean   3.206285e+07           0.479284          0.477958     0.481936   \nstd    3.005308e+07           0.499653          0.499597     0.499756   \nmin    0.000000e+00           0.000000          0.000000     0.000000   \n25%    1.482640e+07           0.000000          0.000000     0.000000   \n50%    2.266880e+07           0.000000          0.000000     0.000000   \n75%    3.692460e+07           1.000000          1.000000     1.000000   \nmax    3.250584e+08           1.000000          1.000000     1.000000   \n\n            Return  \ncount  3017.000000  \nmean      0.000689  \nstd       0.038377  \nmin      -0.242291  \n25%      -0.017647  \n50%       0.000000  \n75%       0.018648  \nmax       0.522901  ",
            "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Open</th>\n      <th>High</th>\n      <th>Low</th>\n      <th>Close</th>\n      <th>Adj Close</th>\n      <th>Volume</th>\n      <th>Increase_Decrease</th>\n      <th>Buy_Sell_on_Open</th>\n      <th>Buy_Sell</th>\n      <th>Return</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>count</th>\n      <td>3017.000000</td>\n      <td>3017.000000</td>\n      <td>3017.000000</td>\n      <td>3017.000000</td>\n      <td>3017.000000</td>\n      <td>3.017000e+03</td>\n      <td>3017.000000</td>\n      <td>3017.000000</td>\n      <td>3017.000000</td>\n      <td>3017.000000</td>\n    </tr>\n    <tr>\n      <th>mean</th>\n      <td>7.306695</td>\n      <td>7.460504</td>\n      <td>7.137385</td>\n      <td>7.296622</td>\n      <td>7.296622</td>\n      <td>3.206285e+07</td>\n      <td>0.479284</td>\n      <td>0.477958</td>\n      <td>0.481936</td>\n      <td>0.000689</td>\n    </tr>\n    <tr>\n      <th>std</th>\n      <td>5.033517</td>\n      <td>5.147391</td>\n      <td>4.903212</td>\n      <td>5.027697</td>\n      <td>5.027697</td>\n      <td>3.005308e+07</td>\n      <td>0.499653</td>\n      <td>0.499597</td>\n      <td>0.499756</td>\n      <td>0.038377</td>\n    </tr>\n    <tr>\n      <th>min</th>\n      <td>1.620000</td>\n      <td>1.690000</td>\n      <td>1.610000</td>\n      <td>1.620000</td>\n      <td>1.620000</td>\n      <td>0.000000e+00</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>-0.242291</td>\n    </tr>\n    <tr>\n      <th>25%</th>\n      <td>3.620000</td>\n      <td>3.690000</td>\n      <td>3.540000</td>\n      <td>3.610000</td>\n      <td>3.610000</td>\n      <td>1.482640e+07</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>-0.017647</td>\n    </tr>\n    <tr>\n      <th>50%</th>\n      <td>6.110000</td>\n      <td>6.250000</td>\n      <td>5.970000</td>\n      <td>6.120000</td>\n      <td>6.120000</td>\n      <td>2.266880e+07</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n      <td>0.000000</td>\n    </tr>\n    <tr>\n      <th>75%</th>\n      <td>9.750000</td>\n      <td>9.900000</td>\n      <td>9.530000</td>\n      <td>9.710000</td>\n      <td>9.710000</td>\n      <td>3.692460e+07</td>\n      <td>1.000000</td>\n      <td>1.000000</td>\n      <td>1.000000</td>\n      <td>0.018648</td>\n    </tr>\n    <tr>\n      <th>max</th>\n      <td>33.180000</td>\n      <td>34.139999</td>\n      <td>32.189999</td>\n      <td>32.720001</td>\n      <td>32.720001</td>\n      <td>3.250584e+08</td>\n      <td>1.000000</td>\n      <td>1.000000</td>\n      <td>1.000000</td>\n      <td>0.522901</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
          },
          "metadata": {}
        }
      ],
      "execution_count": 5,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "shell.execute_reply": "2022-06-29T01:14:25.536Z",
          "iopub.status.busy": "2022-06-29T01:14:25.495Z",
          "iopub.execute_input": "2022-06-29T01:14:25.499Z",
          "iopub.status.idle": "2022-06-29T01:14:25.509Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.svm import OneClassSVM"
      ],
      "outputs": [],
      "execution_count": 6,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2022-06-29T01:14:25.514Z",
          "iopub.execute_input": "2022-06-29T01:14:25.518Z",
          "iopub.status.idle": "2022-06-29T01:14:26.120Z",
          "shell.execute_reply": "2022-06-29T01:14:26.133Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "model = OneClassSVM(kernel = \"rbf\", gamma = 0.001, nu = 0.05).fit(dataset)\n",
        "y_pred = model.predict(dataset)"
      ],
      "outputs": [],
      "execution_count": 7,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2022-06-29T01:14:26.125Z",
          "iopub.execute_input": "2022-06-29T01:14:26.129Z",
          "shell.execute_reply": "2022-06-29T01:14:27.437Z",
          "iopub.status.idle": "2022-06-29T01:14:27.410Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "anomaly_values = dataset.iloc[np.where(y_pred == -1)]\n",
        "anomaly_values"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 8,
          "data": {
            "text/plain": "                 Open       High        Low      Close  Adj Close     Volume  \\\nDate                                                                           \n2007-03-07  14.020000  14.220000  13.900000  14.100000  14.100000   21556900   \n2007-03-08  14.200000  14.270000  13.960000  14.190000  14.190000   21157000   \n2007-05-22  15.480000  15.600000  15.100000  15.420000  15.420000   22971600   \n2007-08-09  12.900000  13.360000  12.860000  13.080000  13.080000   61830100   \n2007-08-10  12.960000  13.190000  12.770000  13.010000  13.010000   26582900   \n...               ...        ...        ...        ...        ...        ...   \n2018-12-19  19.440001  19.719999  18.000000  18.160000  18.160000  120644500   \n2018-12-20  18.110001  18.860001  17.340000  17.940001  17.940001  119394500   \n2018-12-21  18.120001  18.340000  16.760000  16.930000  16.930000  132246000   \n2018-12-24  16.520000  17.219999  16.370001  16.650000  16.650000   62933100   \n2018-12-26  16.879999  17.910000  16.030001  17.900000  17.900000  108811800   \n\n            Increase_Decrease  Buy_Sell_on_Open  Buy_Sell    Return  \nDate                                                                 \n2007-03-07                  0                 1         1  0.000710  \n2007-03-08                  0                 1         1  0.006383  \n2007-05-22                  0                 0         0 -0.000648  \n2007-08-09                  0                 1         0 -0.025335  \n2007-08-10                  0                 1         0 -0.005352  \n...                       ...               ...       ...       ...  \n2018-12-19                  0                 0         0 -0.068718  \n2018-12-20                  1                 1         0 -0.012114  \n2018-12-21                  0                 0         0 -0.056299  \n2018-12-24                  1                 1         1 -0.016539  \n2018-12-26                  1                 1         0  0.075075  \n\n[2058 rows x 10 columns]",
            "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Open</th>\n      <th>High</th>\n      <th>Low</th>\n      <th>Close</th>\n      <th>Adj Close</th>\n      <th>Volume</th>\n      <th>Increase_Decrease</th>\n      <th>Buy_Sell_on_Open</th>\n      <th>Buy_Sell</th>\n      <th>Return</th>\n    </tr>\n    <tr>\n      <th>Date</th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>2007-03-07</th>\n      <td>14.020000</td>\n      <td>14.220000</td>\n      <td>13.900000</td>\n      <td>14.100000</td>\n      <td>14.100000</td>\n      <td>21556900</td>\n      <td>0</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.000710</td>\n    </tr>\n    <tr>\n      <th>2007-03-08</th>\n      <td>14.200000</td>\n      <td>14.270000</td>\n      <td>13.960000</td>\n      <td>14.190000</td>\n      <td>14.190000</td>\n      <td>21157000</td>\n      <td>0</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.006383</td>\n    </tr>\n    <tr>\n      <th>2007-05-22</th>\n      <td>15.480000</td>\n      <td>15.600000</td>\n      <td>15.100000</td>\n      <td>15.420000</td>\n      <td>15.420000</td>\n      <td>22971600</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>-0.000648</td>\n    </tr>\n    <tr>\n      <th>2007-08-09</th>\n      <td>12.900000</td>\n      <td>13.360000</td>\n      <td>12.860000</td>\n      <td>13.080000</td>\n      <td>13.080000</td>\n      <td>61830100</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>-0.025335</td>\n    </tr>\n    <tr>\n      <th>2007-08-10</th>\n      <td>12.960000</td>\n      <td>13.190000</td>\n      <td>12.770000</td>\n      <td>13.010000</td>\n      <td>13.010000</td>\n      <td>26582900</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>-0.005352</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>2018-12-19</th>\n      <td>19.440001</td>\n      <td>19.719999</td>\n      <td>18.000000</td>\n      <td>18.160000</td>\n      <td>18.160000</td>\n      <td>120644500</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>-0.068718</td>\n    </tr>\n    <tr>\n      <th>2018-12-20</th>\n      <td>18.110001</td>\n      <td>18.860001</td>\n      <td>17.340000</td>\n      <td>17.940001</td>\n      <td>17.940001</td>\n      <td>119394500</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0</td>\n      <td>-0.012114</td>\n    </tr>\n    <tr>\n      <th>2018-12-21</th>\n      <td>18.120001</td>\n      <td>18.340000</td>\n      <td>16.760000</td>\n      <td>16.930000</td>\n      <td>16.930000</td>\n      <td>132246000</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>-0.056299</td>\n    </tr>\n    <tr>\n      <th>2018-12-24</th>\n      <td>16.520000</td>\n      <td>17.219999</td>\n      <td>16.370001</td>\n      <td>16.650000</td>\n      <td>16.650000</td>\n      <td>62933100</td>\n      <td>1</td>\n      <td>1</td>\n      <td>1</td>\n      <td>-0.016539</td>\n    </tr>\n    <tr>\n      <th>2018-12-26</th>\n      <td>16.879999</td>\n      <td>17.910000</td>\n      <td>16.030001</td>\n      <td>17.900000</td>\n      <td>17.900000</td>\n      <td>108811800</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0.075075</td>\n    </tr>\n  </tbody>\n</table>\n<p>2058 rows × 10 columns</p>\n</div>"
          },
          "metadata": {}
        }
      ],
      "execution_count": 8,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2022-06-29T01:14:27.416Z",
          "iopub.execute_input": "2022-06-29T01:14:27.419Z",
          "iopub.status.idle": "2022-06-29T01:14:27.446Z",
          "shell.execute_reply": "2022-06-29T01:14:27.441Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "plt.scatter(dataset[\"Return\"], dataset[\"Adj Close\"])\n",
        "plt.scatter(anomaly_values[\"Return\"],anomaly_values[\"Adj Close\"], c = \"r\")"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 9,
          "data": {
            "text/plain": "<matplotlib.collections.PathCollection at 0x1f3560d8a58>"
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": "<Figure size 432x288 with 1 Axes>",
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAwwklEQVR4nO2df5xU9Xnv38/MLsuguwzKLghi0JprGkyEAKmpuSRo8pIYQ0yakHpva+rNvfbmBqNGjCjyUgKrKCRq2V5vbZum3vam2sRfQcUoYo0xymLAH9QaTdIUFmRX2WXRnV3Ymef+MTPL/Dhn5szs/Dgz87xfr/PamTPnnHnm7MznfM/zfX6IqmIYhmHUHoFqG2AYhmEUhwm4YRhGjWICbhiGUaOYgBuGYdQoJuCGYRg1SlMl32zq1Kk6e/bsSr6lYRhGzfPiiy++rartmesrKuCzZ89mx44dlXxLwzCMmkdEfue03lwohmEYNYoJuGEYRo1iAm4YhlGjmIAbhmHUKCbghmEYNYoJuOFLuju7eGvKNGIS4K0p0+ju7Kq2SYbhO0zAjZw4Cel4xTXf/t2dXZy5ZgXTB3oJoEwf6OXMNStMxA0jE1Wt2DJ//nw1/M/2dZt0f7hDo6BRUE1ZhiWoI8GmtHVDzS26fd0mz8ceam7Juf/+cEfa68llf7ijXB/ZMHwNsEMdNNVG4EYa6aPf7Fu0Fo0yITqati50dIRZG9d6Ov6sjWsJHR1x3b+7s4tpA72O+3YM9Hl6D8NoFEzAjTRO77w+S2C94FVc3bbrGOgbu3iIy7694axMYsNoaEzADSA+8u2f1EY4crio/b2Kq9t2veF2x9F5kkhzC3tWrC7KNsOoV0zAjbGR75TIYdfRb5IRCXIkmF5CpxBx3bNiNZHmFsf93UbnCrx640YWrlru6T0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S1UfqZBNqXj93/5Rwj32IxGZVW6jmsr9BuVGRJ4Epju8tCr1iaqqiLiOJkTkJOD/Al9V1ZKN3kpln1FfiMifAAuAT1TblkxU9S+BvxSR/wLcAHy1yiYhIgHge8TdFH7lJ8APVXVERP6c+J3queV8w5oXcFX9lNtrInJARE5S1f0Jge512a4NeARYparP+82+CtIDpI4aTk6sc9pmr4g0AZOBdypjnif7qokn+0TkU8Qv4J9Q1ZEK2QaFn79/Au4qq0XHyGdbK3Am8HTCYzcdeFhElqpqJfo05j13qpr6O/gb4ncwZaXeXSgPc2z08FXgocwNRGQC8ABwj6r+qIK2gQf7Kkw38H4ROTVxXv6YuI2ppNr8JeApTczg+MS+apLXPhGZB/wVsFRVK33B9mLf+1OefhZ4ww+2qeohVZ2qqrNVdTbx+YNKiXde+2DsLj7JUuC1sltVyRnTSi/EfbNbiX8JnwROSKxfAPxN4vGfAEeBXSnLXL/Yl3j+M6APiBD3vZ1fRpsuAH5FfB5gVWLdd4j/WAAmAv8MvAlsB06r8P80n30LE+foPeJ3Brt9Zt+TwIGU79rDPrPvTmB3wrZtwBy/2Jax7dNUMArF47m7JXHuXkqcuw+U2yZLpTcMw6hR6t2FYhiGUbeYgBuGYdQoJuCGYRg1igm4YRhGjWICbhiGUaOYgBuGYdQoJuCGYRg1yv8HwUieDLW/NIgAAAAASUVORK5CYII=\n"
          },
          "metadata": {
            "needs_background": "light"
          }
        }
      ],
      "execution_count": 9,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2022-06-29T01:14:27.452Z",
          "iopub.execute_input": "2022-06-29T01:14:27.456Z",
          "iopub.status.idle": "2022-06-29T01:14:27.547Z",
          "shell.execute_reply": "2022-06-29T01:14:27.569Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "model = OneClassSVM(kernel = \"rbf\", gamma = 0.001, nu = 0.01).fit(dataset)\n",
        "y_pred = model.predict(dataset)"
      ],
      "outputs": [],
      "execution_count": 10,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2022-06-29T01:14:27.553Z",
          "iopub.execute_input": "2022-06-29T01:14:27.557Z",
          "shell.execute_reply": "2022-06-29T01:14:28.874Z",
          "iopub.status.idle": "2022-06-29T01:14:28.825Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "anomaly_values = dataset.iloc[np.where(y_pred == -1)]\n",
        "anomaly_values"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 11,
          "data": {
            "text/plain": "             Open   High    Low  Close  Adj Close     Volume  \\\nDate                                                           \n2007-02-20  14.93  15.01  14.70  14.92      14.92   21961300   \n2007-02-21  14.83  14.85  14.52  14.56      14.56   23986900   \n2007-02-22  14.66  14.70  14.43  14.54      14.54   26771700   \n2007-02-23  14.59  14.76  14.59  14.69      14.69   22884800   \n2007-02-26  14.83  15.73  14.80  15.68      15.68   65831500   \n...           ...    ...    ...    ...        ...        ...   \n2017-05-31  11.29  11.49  11.10  11.19      11.19   42929000   \n2017-06-01  11.25  11.29  10.81  10.93      10.93   48002000   \n2017-06-02  10.93  10.96  10.57  10.90      10.90   43056200   \n2017-06-05  10.84  11.34  10.80  11.24      11.24   66207300   \n2017-06-06  11.27  12.24  11.24  12.03      12.03  114998600   \n\n            Increase_Decrease  Buy_Sell_on_Open  Buy_Sell    Return  \nDate                                                                 \n2007-02-20                  1                 0         0 -0.001339  \n2007-02-21                  1                 0         0 -0.024129  \n2007-02-22                  0                 0         1 -0.001374  \n2007-02-23                  1                 1         1  0.010316  \n2007-02-26                  0                 1         0  0.067393  \n...                       ...               ...       ...       ...  \n2017-05-31                  1                 0         0  0.006295  \n2017-06-01                  0                 0         0 -0.023235  \n2017-06-02                  1                 0         1 -0.002745  \n2017-06-05                  1                 1         1  0.031193  \n2017-06-06                  1                 1         1  0.070285  \n\n[2216 rows x 10 columns]",
            "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Open</th>\n      <th>High</th>\n      <th>Low</th>\n      <th>Close</th>\n      <th>Adj Close</th>\n      <th>Volume</th>\n      <th>Increase_Decrease</th>\n      <th>Buy_Sell_on_Open</th>\n      <th>Buy_Sell</th>\n      <th>Return</th>\n    </tr>\n    <tr>\n      <th>Date</th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>2007-02-20</th>\n      <td>14.93</td>\n      <td>15.01</td>\n      <td>14.70</td>\n      <td>14.92</td>\n      <td>14.92</td>\n      <td>21961300</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>-0.001339</td>\n    </tr>\n    <tr>\n      <th>2007-02-21</th>\n      <td>14.83</td>\n      <td>14.85</td>\n      <td>14.52</td>\n      <td>14.56</td>\n      <td>14.56</td>\n      <td>23986900</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>-0.024129</td>\n    </tr>\n    <tr>\n      <th>2007-02-22</th>\n      <td>14.66</td>\n      <td>14.70</td>\n      <td>14.43</td>\n      <td>14.54</td>\n      <td>14.54</td>\n      <td>26771700</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n      <td>-0.001374</td>\n    </tr>\n    <tr>\n      <th>2007-02-23</th>\n      <td>14.59</td>\n      <td>14.76</td>\n      <td>14.59</td>\n      <td>14.69</td>\n      <td>14.69</td>\n      <td>22884800</td>\n      <td>1</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.010316</td>\n    </tr>\n    <tr>\n      <th>2007-02-26</th>\n      <td>14.83</td>\n      <td>15.73</td>\n      <td>14.80</td>\n      <td>15.68</td>\n      <td>15.68</td>\n      <td>65831500</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0.067393</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>2017-05-31</th>\n      <td>11.29</td>\n      <td>11.49</td>\n      <td>11.10</td>\n      <td>11.19</td>\n      <td>11.19</td>\n      <td>42929000</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0.006295</td>\n    </tr>\n    <tr>\n      <th>2017-06-01</th>\n      <td>11.25</td>\n      <td>11.29</td>\n      <td>10.81</td>\n      <td>10.93</td>\n      <td>10.93</td>\n      <td>48002000</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>-0.023235</td>\n    </tr>\n    <tr>\n      <th>2017-06-02</th>\n      <td>10.93</td>\n      <td>10.96</td>\n      <td>10.57</td>\n      <td>10.90</td>\n      <td>10.90</td>\n      <td>43056200</td>\n      <td>1</td>\n      <td>0</td>\n      <td>1</td>\n      <td>-0.002745</td>\n    </tr>\n    <tr>\n      <th>2017-06-05</th>\n      <td>10.84</td>\n      <td>11.34</td>\n      <td>10.80</td>\n      <td>11.24</td>\n      <td>11.24</td>\n      <td>66207300</td>\n      <td>1</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.031193</td>\n    </tr>\n    <tr>\n      <th>2017-06-06</th>\n      <td>11.27</td>\n      <td>12.24</td>\n      <td>11.24</td>\n      <td>12.03</td>\n      <td>12.03</td>\n      <td>114998600</td>\n      <td>1</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.070285</td>\n    </tr>\n  </tbody>\n</table>\n<p>2216 rows × 10 columns</p>\n</div>"
          },
          "metadata": {}
        }
      ],
      "execution_count": 11,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2022-06-29T01:14:28.834Z",
          "iopub.execute_input": "2022-06-29T01:14:28.838Z",
          "iopub.status.idle": "2022-06-29T01:14:28.848Z",
          "shell.execute_reply": "2022-06-29T01:14:28.878Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "plt.scatter(dataset[\"Return\"], dataset[\"Adj Close\"])\n",
        "plt.scatter(anomaly_values[\"Return\"],anomaly_values[\"Adj Close\"], c = \"r\")"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 12,
          "data": {
            "text/plain": "<matplotlib.collections.PathCollection at 0x1f3594a29b0>"
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": "<Figure size 432x288 with 1 Axes>",
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAvIUlEQVR4nO2df5xT9ZnvP08yccgoQwYZQAYs9MfVu2gFGbpuaWnBdkVFSq1r691W2+5d9+4WWy2g0yIFKhQUXaXSda+721a6fVmtrZSCyvoDF3/UyiBYpdZra21lQGZaZgQkDDOT5/6RnHCSnJOcJOecnCSf9+t1XpOcnCRPfswnz3m+zw9RVRBCCKk+QpU2gBBCSGlQwAkhpEqhgBNCSJVCASeEkCqFAk4IIVVKg59PNmrUKJ04caKfT0kIIVXPzp07/6Sqrdn7fRXwiRMnorOz08+nJISQqkdE/mC1nyEUQgipUijghBBSpVDACSGkSqGAE0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vbROSAiJymqvtTAt1tc1wzgC0Alqjqc0Gzz0e6AJi9hvGpfVbH7BWRBgAjAPzZH/Mc2VdJHNknIh9D8gf8I6ra75NtQPHv348A3OWpRScoZNtwAGcBeDIVsRsLYJOIzFNVP+Y0FnzvVNX8f/DvSJ7BeEqth1A24YT3cBWAn2UfICInAXgQwAZVfcBH2wAH9vnMDgDvE5FJqfflM0jaaMZs82UAntDUCk5A7KskBe0TkakA/i+Aearq9w+2E/veZ7p6MYDXgmCbqr6tqqNUdaKqTkRy/cAv8S5oH5A+izeYB+AVz63yc8XU7w3J2OzjSH4JHwMwMrW/HcC/py5/FsAAgN2mbUpQ7EtdfwpAD4A4krG3Czy06SIA/w/JdYAlqX3fRPKfBQCGAfgxgN8CeB7Au33+TAvZNz31Hr2D5JnBnoDZ9xiAA6bv2qaA2bcOwJ6UbdsATA6KbVnHPgkfs1AcvnerU+/di6n37kyvbWIpPSGEVCm1HkIhhJCahQJOCCFVCgWcEEKqFAo4IYRUKRRwQgipUijghBBSpVDACSGkSvn/q9N6cAsTebUAAAAASUVORK5CYII=\n"
          },
          "metadata": {
            "needs_background": "light"
          }
        }
      ],
      "execution_count": 12,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2022-06-29T01:14:28.853Z",
          "iopub.execute_input": "2022-06-29T01:14:28.857Z",
          "shell.execute_reply": "2022-06-29T01:14:28.946Z",
          "iopub.status.idle": "2022-06-29T01:14:28.953Z"
        }
      }
    }
  ],
  "metadata": {
    "kernel_info": {
      "name": "python3"
    },
    "language_info": {
      "name": "python",
      "version": "3.6.13",
      "mimetype": "text/x-python",
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "pygments_lexer": "ipython3",
      "nbconvert_exporter": "python",
      "file_extension": ".py"
    },
    "kernelspec": {
      "argv": [
        "C:/Users/Tin Hang/Anaconda3\\python.exe",
        "-m",
        "ipykernel_launcher",
        "-f",
        "{connection_file}"
      ],
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "nteract": {
      "version": "0.28.0"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}